package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.corona.Game;
import com.corona.game.util.TextureCache;

/* compiled from: Menu.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/DrawWhiteScreen.class */
class DrawWhiteScreen extends Action {
    public Action.Layer layer;
    int duration;
    Sprite bgSprite;

    public DrawWhiteScreen(Action nextAction) {
        super(new Object[0]);
        this.layer = Action.Layer.gui_110;
        this.duration = 18;
        this.nextAction = nextAction;
        this.bgSprite = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame6.png")), 0, 0, 160, 144);
    }

    public DrawWhiteScreen(int duration, Action nextAction) {
        this(nextAction);
        this.duration = duration;
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        this.bgSprite.draw(game.uiBatch);
        this.duration--;
        if (this.duration <= 0) {
            game.insertAction(this.nextAction);
            game.actionStack.remove(this);
        }
    }
}
